package org.fanpeng.demo.design;

/**
 * className: Singleton_00
 * Description:
 * date: 2021/8/4 11:13
 *
 * @author fanpeng
 * @version 1.0
 */
public class Singleton_04 {
    //  使⽤类的内部类(线程安全)
    private static class SingletonHolder {
        private static Singleton_04 instance = new Singleton_04();
    }

    private Singleton_04(){
    }

    public static Singleton_04 getInstance() {
        return SingletonHolder.instance;
    }
}
